// pages/dome/dome.js
var units = require("../../commit/units.js")
var request = require("../../commit/request.js")
// var domeAA = require("/dome.wxs")
Page({

  /**
   * 页面的初始数据
   */
  data: {
    aaaa: '8',
    toastedit: '',
    bbbb: '11111111111111'
  },
  click: function(e) {

  },
  showToast: function() {
    this.toastedit.showToast('服务器错误', 2000)
  },
  aaa: function() {
    let data = {
      url: '/approval/approval/index',
      data: {
        companyId: 'a7e7e48cab1c4ee385e1cc78ad4fb009'
      }
    }
    return request.getFun(data)
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function(options) {
    let data = {
      url: '/approval/approval/index',
      data: {

      }
    }
    // let a =
    // console.log(this.aaa())
    request.getFun(data).then(res => {
      console.log(res)
    })
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function() {

    this.toastedit = this.selectComponent("#toastedit")
    // this.toastedit = this.selectComponent("#toastedit")
    console.log(this.data.aaaa)
    let self = this

    this.setData({
      posts_key: units.domeFun(this.data.aaaa, this.data.aaaa)
    });
  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function() {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function() {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function() {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function() {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function() {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function() {

  }
})